package com.boscloud.controller;

import com.boscloud.pojo.StorageLocation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.boscloud.service.StorageLocationService;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@CrossOrigin //允许跨域
@RestController
public class StorageLocationController {
    @Autowired
    private StorageLocationService StorageLocationService;
    @PostMapping("/StorageLocationList")//扫描条码--获取原料入库信息
    public List<StorageLocation> getStorageLocationList(@RequestBody Map<String, Object> params) throws IOException {
        Map<String, String> headers = new HashMap<String, String>();
        headers.put("PORTID","ITMS002");//接口ID
        return StorageLocationService.getStorageLocationList(params,headers);
    }

}
